package com.wxtl.util;

import java.io.IOException;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 系统初始化的工作在init()方法中
 * @author hc24
 *
 */
public class InitServlet extends HttpServlet {

	public void init() throws ServletException {
		ServletContext sc=getServletContext();
		String ctx=sc.getContextPath();
		sc.setAttribute("ctx", ctx);//应用上下文
		sc.setAttribute("constant", new Constants());//全局静态常量
		sc.setAttribute("status", new Status());//系统状态常量
		
	}
	
	public void destroy() {
		super.destroy();		
	}

	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doPost(request, response);
		
	}

	
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

	}

}
